package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.bwie.poi.Excel;
import lombok.Data;
import org.springframework.data.annotation.Id;

/**
 * 订单表
 *
 * @TableName tb_order
 */
@TableName(value = "tb_order")
@Data
public class TbOrder implements Serializable {
    /**
     * 订单ID
     */
    @TableId(type = IdType.AUTO)
    @Id
    @Excel(name = "订单ID", sort = 1)
    private Integer orderId;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号", sort = 2)
    private String orderNo;

    /**
     * 订单状态;0未支付1已支付2待发货
     */
    @Excel(name = "订单状态", readConverterExp = "0=未支付,1=已支付,2=待发货")
    private Integer orderStatus;

    /**
     * 订单金额
     */
    @Excel(name = "订单金额")
    private BigDecimal orderAmount;

    /**
     * 支付时间
     */
    private Date payTime;

    /**
     * 订单类型
     */
    private Integer orderType;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 商品信息
     */
    @Excel(name = "商品信息")
    private String prodInfo;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间", dateFormat = "YYYY-mm-dd HH:mm:ss", sort = 5)
    private Date createdTime;

    /**
     * 更新人
     */
    private String updatedBy;

    /**
     * 更新时间
     */
    private Date updatedTime;
    /**
     * 商品图片
     */
    @TableField(exist = false)
    private List<String> images;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}